package com.sxf.auth.captcha.enums;



import com.sxf.consts.ISystemCode;

import java.text.MessageFormat;


/**
 * @author Author
 */

public enum CaptchaErrorEnum implements ISystemCode {
    /**
     * 错误枚举
     * */
    VERIFY_CODE_SEND_FAIL(1400,"图形验证码生成失败"),
    IMAGE_EXPIRES(1401, "图片已过期，请重新尝试"),
    IMAGE_VERIFY_FAIL(1402, "验证失败，请重新尝试"),
    ;
    /**
     * 状态码
     *
     */
    private final int status;

    /**
     * 中文描述
     * */
    private final String statusInfo;

    CaptchaErrorEnum(int status, String statusInfo){
        this.status = status;
        this.statusInfo=statusInfo;
    }

    @Override
    public int getCode(){
        return status;
    }

    @Override
    public String getMessage(Object... params) {
        return MessageFormat.format(statusInfo, params);
    }
}
